<? include 'server_config.php'; 

if($_POST['idx']=="")
{
	
	?>
	<script>
		alert("!");
	</script>
	<?
	return;
}

?>

<?


$sql = "

UPDATE ndd_memo SET read_timestamp = CURRENT_TIMESTAMP, reg_timestamp = reg_timestamp WHERE memo_idx='$idx' AND target_idx='$user_idx' AND read_timestamp='0000-00-00 00:00:00' LIMIT 1;
";

//echo $sql;
$result = mysql_query($sql,$connect);

?>

